<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="../img/base.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="../js/jquery-1.8.2.min.js"></script>
<script language="javascript">
function checkSubmit(){
	var period_name = $.trim($('#period_name').val());
	
	if(period_name.length <= 0)
	{
		alert('请填写名称！');
		return false;
	}
}

function check_period(){
	var status = $("input[name=status]:checked").val();
	if(status==1){
		if(!confirm("确定要把状态设置为启用吗")){
			return false;
		}
	}
}
</script>
</head>
<body leftmargin='15' topmargin='10' bgcolor="#FFFFFF">
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0" id="head1" style="border-bottom:1px solid #CCCCCC">
	<tr>
    	<td align='center' valign='top' colspan="2">
            <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#D1DDAA">
                <tr>
                    <td height="26" background="../img/newlinebg3.gif">
                        <table width="98%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td align="right">
                                    <input type='button' class="coolbg np" onClick="location='period.php?mc_cinemaid=<{$cinemaid}>';" value='返回' />
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
    	<td>
        	<table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr bgcolor="#FFFFFF">
                    <td height="4"></td>
                </tr>
            </table>
        </td>
    </tr>
  	<tr>
    	<td colspan="2">
      		<table width="800" border="0" cellpadding="0" cellspacing="0">
        		<tr>
          			<td width="84" height="24" align="center" background="../img/itemnote1.gif">&nbsp;<{if $op == 'add'}>添加<{else}>修改<{/if}>时间段&nbsp;</td>
          			<td width="84"></td>
          			<td>&nbsp;</td>
        		</tr>
      		</table>
    	</td>
	</tr>
</table>
<form name="form1" action="period.php" enctype="multipart/form-data" method="post" onSubmit="return checkSubmit()">
<table width="98%"  border="0" align="center" cellpadding="2" cellspacing="2" id="needset">

  	<tr>
    	<td height="24" class="bline">
      		<table width="470" border="0" cellspacing="0" cellpadding="0">
                <tr>
          			<td width="58">&nbsp;名称：</td>
          			<td width="412"><input name="period_name" type="text" id="period_name" size="30" class="iptxt" value="<{$period_index_info.period_name}>" /><span style="color:#F00">*必填</span></td>
        		</tr> 
      		</table>      
    	</td>
  	</tr>
    <tr>
    	<td height="24" class="bline">
      		<table width="442" border="0" cellspacing="0" cellpadding="0">
                <tr>
          			<td width="60">&nbsp;优先级<strong>（值小的优先计算）</strong>：</td>
          			<td width="382"><input name="period_priority" type="text" id="period_priority" size="30" class="iptxt" value="<{$period_index_info.period_priority}>" /></td>
                </tr>
      		</table>      
    	</td>
  	</tr>
    <tr>
    	<td height="24" class="bline">
      		<table width="800" border="0" cellspacing="0" cellpadding="0">
                <tr>
          			<td width="61">&nbsp;备注：</td>
          			<td width="739"><textarea id="period_remark" rows="2" cols="50" name="period_remark" ><{$period_index_info.period_remark}></textarea></td>
                </tr>
      		</table>      
    	</td>
  	</tr>
    <tr>
    	<td height="24" class="bline">
      		<table width="800" border="0" cellspacing="0" cellpadding="0">
                <tr>
          			<td width="64">&nbsp;状态：</td>
          			<td width="736">
                    <input type="radio" value="2" <{if $period_index_info.status == 2 || $period_index_info.status == ''}> checked="checked"<{/if}>  name="status" /> 测试
                    <input type="radio" value="1" <{if $period_index_info.status == 1}>checked="checked" <{/if}> name="status" /> 启用
                    <input type="radio" value="0" <{if $period_index_info.status === '0'}>checked="checked" <{/if}> name="status" /> 禁用
                    </td> 
        		</tr>
      		</table>      
    	</td>
  	</tr>
</table>

<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    	<td height="56">
			<table width="98%" border="0" cellspacing="1" cellpadding="1">
        		<tr>
          			<td align="center">
          				<table width="214" border="0" cellspacing="0" cellpadding="0" >
              				<tr>
				                <td width="115">
                                	<input type="hidden" name="period_id" value="<{$period_index_info.period_id}>" />
                                	<input type="hidden" name="op" value="<{if $op=='add'}>save<{else}>update<{/if}>" />
                                	<input type="hidden" name="mc_cinemaid" value="<{$cinemaid}>" />
				                    <input name="imageField" type="image" src="../img/button_ok.gif" width="60" height="22" class="np" border="0"  style="cursor:pointer; " onclick="return check_period()">
				                </td>
				                <td width="99">
				                	<img src="../img/button_reset.gif" width="60" height="22" border="0" onClick="location.reload();" style="cursor:pointer; ">
				                </td>
			              	</tr>
						</table>
					</td>
    			</tr>
			</table>
		</td>
	</tr>
</table>
</form>
</body>

</html>